package com.fast.cron.db.dao;

import com.fast.cron.db.entry.JobLog;

import java.sql.SQLException;

/**
 * @author: Leo Jie
 * @date: 2018-10-04 20:13
 * @version: v1.0
 */
public interface JobLogDao {
    /**
     * add log of one job
     *
     * @param jobLog log obj of job
     * @return row number
     * @throws SQLException the error when execute sql
     */
    long addJobLog(JobLog jobLog) throws SQLException;


    /**
     * query message of job
     *
     * @param executionJobId id of execution job
     * @return job log obj
     * @throws SQLException the error when execute sql
     */
    JobLog messageOfLog(int executionJobId) throws SQLException;
}
